<%--
  Created by IntelliJ IDEA.
  User: Joker
  Date: 2022/5/2
  Time: 17:46
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>手机信息</title>
    <style>
        table {
            border-collapse : collapse;
            margin: 200px auto;
        }
    </style>
</head>
<script src="${pageContext.request.contextPath}/statics/js/jquery-1.8.0.min.js"></script>
<script>
    function Del(id) {
        var ret = confirm("确定要删除？");

        if (ret) {
            location.href = "${pageContext.request.contextPath}/del/" + id;
        }
    }
</script>
<body>
<table border="1px">
    <tr>
        <th colspan="3" style="font-size: 22px">手机信息</th>
    </tr>
    <tr>
        <th>品牌型号</th>
        <th>参考报价</th>
        <th>操作</th>
    </tr>
    <c:forEach var="tmp" items="${list}">
        <tr>
            <td>${tmp.nameType}</td>
            <td>￥${tmp.price}</td>
            <td>
                <a href="${pageContext.request.contextPath}/select/${tmp.hsId}">详情</a>
                <a href="javascript:void(0)" onclick="Del(${tmp.hsId})">删除</a>
            </td>
        </tr>
    </c:forEach>
</table>
</body>
</html>
